﻿using System.Collections.Generic;
using System.Web.UI.WebControls.WebParts;

namespace SP2010
{
    public static class PageLayouts
    {
        // TO DO : Append a new GUID to the page content type 
        public const string CustomLayoutContentTypeID = "0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900" ;
        // TODO:  We need to instantiate a different content type per page layout.  Use inheritance to inherit base types though.

        public enum WHLayoutTypes
        {
            None = -1,
            CustomLayout1 = 0,
            CustomLayout2 = 1,
            CustomLayout3 = 2,
            CustomBlankLayout = 3
        }
    }

    public class WebPartInfo
    {
        public WebPart WebPart { get; set; }
        public string Zone { get; set; }
        public int Order { get; set; }
    }

    public class PublishingPageInfo
    {

        public PublishingPageInfo()
        {
            // Default to expected values
            ContentTypeId = PageLayouts.CustomLayoutContentTypeID;
            LayoutType = PageLayouts.WHLayoutTypes.CustomLayout2;
            WebParts = new List<WebPartInfo>();
        }

        public string ContentTypeId { get; set; }
        public PageLayouts.WHLayoutTypes LayoutType { get; set; }
        public string Name { get; set; }
        public string Title { get; set; }
        public bool IsDefaultPage { get; set; }
        public List<WebPartInfo> WebParts { get; private set; }
        public string FolderName { get; set; }
    }
}
